package cn.ren.controller;

import cn.ren.constant.MessageConstant;
import cn.ren.entity.Result;
import cn.ren.pojo.CheckItem;
import cn.ren.pojo.Role;
import cn.ren.service.LZRoleService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/role")
@RestController
public class LZRoleController {
    @Reference
    LZRoleService lzRoleService;


    @RequestMapping("/findAll")
    public Result findAll(){
        try {
            List<Role> list = lzRoleService.findAll();
            return new Result(true, "角色查询成功",list);
        } catch (Exception e) {
            e.printStackTrace();
            return new Result(false,"角色查询失败");
        }
    }
}
